package com.ruoyi.course.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.course.mapper.CoverImageMapper;
import com.ruoyi.course.domain.CoverImage;
import com.ruoyi.course.service.ICoverImageService;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-29
 */
@Service
public class CoverImageServiceImpl implements ICoverImageService 
{
    @Autowired
    private CoverImageMapper coverImageMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public CoverImage selectCoverImageById(Long id)
    {
        return coverImageMapper.selectCoverImageById(id);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param coverImage 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<CoverImage> selectCoverImageList(CoverImage coverImage)
    {
        return coverImageMapper.selectCoverImageList(coverImage);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param coverImage 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertCoverImage(CoverImage coverImage)
    {
        coverImage.setCreateTime(DateUtils.getNowDate());
        return coverImageMapper.insertCoverImage(coverImage);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param coverImage 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateCoverImage(CoverImage coverImage)
    {
        return coverImageMapper.updateCoverImage(coverImage);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param ids 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteCoverImageByIds(Long[] ids)
    {
        return coverImageMapper.deleteCoverImageByIds(ids);
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param id 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteCoverImageById(Long id)
    {
        return coverImageMapper.deleteCoverImageById(id);
    }
}
